---
title: 'Efficient Youtube Embed'
tags: 'nextjs,react'
description: "Lib usage so your youtube embed won't bloat your website"
---

This package allow us to embed a Youtube Video without actually loading the iframe, so we only show the thumbnail as an image then only load the iframe if clicked

## Package Dependencies

```bash
yarn add react-lite-youtube-embed
```

And add this to globals.css

```css
.yt-lite::before {
  content: none !important;
}
```

## Usage

```jsx
import LiteYouTubeEmbed from 'react-lite-youtube-embed';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';

<LiteYouTubeEmbed id='dHAbmoFHqgA' poster='hqdefault' noCookie={true} />;
```
